package com.gen.entity;

import com.gen.common.EntityBase;

@SuppressWarnings("serial")
public class User extends EntityBase {
	private String username;// 登录名
	private String password;// 登录密码
	private String alias;//
	private String description;// 描述
	private String email;// 电子邮箱
	private UserStatus status;// 状态
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String getAlias() {
		return alias;
	}
	public void setAlias(String alias) {
		this.alias = alias;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public UserStatus getStatus() {
		return status;
	}
	public void setStatus(UserStatus status) {
		this.status = status;
	}

	public enum UserStatus {
		/** 激活用户，新系统创建(通过注册到用户中心)出的用户都属于此状态 */
		ACTIVE("ACTIVE"),
		/** 欠费用户 */
		OWED("OWED"),
		/** 未激活用户(老系统刚创建的用户为 NORMAL 状态，在数据迁移到新系统属于此状态 */
		INACTIVE("INACTIVE"),
		/** 冻结用户 */
		FROZEN("FROZEN"), LOGICAL_DELETED("LOGICAL_DELETED");
		private final String status;

		private UserStatus(String status) {
			this.status = status;
		}

		public String value() {
			return status;
		}

		@Override
		public String toString() {
			return status;
		}
	}
}
